package com.conjane.tutorial.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/gateway")
public class GatewayController {

    @GetMapping("/getHeader")
    public String getHeader(HttpServletRequest request, HttpServletResponse response){
        String name = request.getHeader("name");
        return name;
    }
}
